package cn.ilovese.collect.vo.report;

import cn.ilovese.collect.vo.similarity.ReportSimilarityVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
public class ReportWithSimilarityVO {
    private Integer id;

    private String taskname;

    private String workername;

    private String type;

    private String environment;

    private String description;

    private String steps;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date submittime;

    private List<ReportSimilarityVO> reportSimilarities;

    private Boolean editable;

    public ReportWithSimilarityVO(@NonNull ReportVO reportVO){
        id = reportVO.getId();
        taskname = reportVO.getTaskname();
        workername = reportVO.getWorkername();
        type = reportVO.getType();
        environment = reportVO.getEnvironment();
        description = reportVO.getDescription();
        steps = reportVO.getSteps();
        submittime = reportVO.getSubmittime();
    }
}
